import { Body, Controller, Get, HttpCode, Post, Query } from '@nestjs/common';
import { ICreatuser, ILogin } from './interface'
import { UserService } from './service'

@Controller('user')
export class UserController {
	constructor(private readonly service: UserService) { }

	@Post('login')
	@HttpCode(200)
	login(@Body() body: ILogin) {
		return this.service.login(body)
	}

	@Get('add')
	@HttpCode(200)
	add(@Query() body: ICreatuser) {
		return this.service.add(body)
	}
}
